function findMaxWelfareCombination()
    % Load welfare matrix (replace this with your actual data)
    load Results_NN.mat;

    WelfareMatrix = [GFT1' GFT3' shock13(position(:,2))' shockchi31(position(:,3))' shockchi33(position(:,5))'];
    
    % Extract data from the matrix
    Welfare1 = WelfareMatrix(:, 1);
    Welfare2 = WelfareMatrix(:, 2);
    
    % Find the rows where both Welfare1 and Welfare2 are greater than 0
    validRows = Welfare1 >= 0 & Welfare2 >= 0;

    % Calculate the objective function
    objectiveFunction = Welfare1(validRows).^0.5 .* Welfare2(validRows).^0.5;

    % Find the index of the row that maximizes the objective function
    [~, maxRowIndex] = max(objectiveFunction);

    % Display the row that maximizes the objective function
    disp('Row that maximizes welfare1*0.5 + welfare2*0.5 (both Welfare1 and Welfare2 > 0):');
    disp(WelfareMatrix(validRows, :));
    Welfare2 = WelfareMatrix(validRows, :);
 disp('Maximizing Row:');
disp(Welfare2(maxRowIndex, :));
disp(resultsgc1(maxRowIndex,150));
disp(resultsgc1(maxRowIndex,1));
disp([Welfare2(maxRowIndex, :) resultsgc1(maxRowIndex,1) resultsgc1(maxRowIndex,150)]);

end
